
import {unstable_HistoryRouter as HistoryRouter,Routes,Route} from 'react-router-dom'
import {  history } from './utils/history'
import Layout from '@/pages/Layout'
import Login from '@/pages/Login'
import './App.css'
import {AuthComponent}  from '@/components/AuthComponent'
import Article from './pages/Article'
import Home from './pages/Home'
import Publish from './pages/Publish'
function App() {
  return (
    //路由配置
  
    <HistoryRouter history={history}>
    <div className="App"> 

       <Routes>
         {/* layout 需要鉴权处理 */}
      <Route path='/' element={<AuthComponent><Layout/></AuthComponent>}>
        <Route index element={<Home/>}></Route>
        <Route path='article' element={<Article/>}></Route>
        <Route path='publish' element={<Publish/>}> </Route>

         
      </Route>
      <Route path='/login' element={<Login/>}></Route>
    </Routes>
    </div></HistoryRouter>
  );
}

export default App;
